package modelLag;
import java.util.ArrayList;

/**
 * Write a description of class OrderCon here.
 * 
 * @author (Christian, Umut, Christoffer, Patrick, Simon) 
 * @project (Semesterprojekt)
 * @version (2014.12.09)
 */
public class OrderCon
{
    private static OrderCon orderCon;
    private ArrayList<Order> orders;
    
    /**
     * Constructor for objects of class OrderCon
     */
    private OrderCon(){
        orders = new ArrayList<Order>();
    }
    
    /**
     * Returns an instance of OrderCon
     * 
     * @return an instance of OrderCon
     */ 
    
    public static OrderCon getInstance(){
        if(orderCon == null) 
        {
            orderCon = new OrderCon();
        }
        return orderCon;
    }
    
    /**
     * Adds an Order object to the order Arraylist in the OrderCon class
     * 
     * @param o is the user input for a specific order
     */
    public void addOrder(Order o){
        orders.add(o);
    }
}
